package cn.com.tomato.controller.domain.todoSet;

import cn.com.tomato.model.ToDo;
import cn.com.tomato.model.TodoSet;
import cn.hutool.core.bean.BeanUtil;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

/**
 * @Author: chenlj
 * @CreateTime: 2024-08-28 17:27
 * @Description: todo
 */
public class ToDoVo {

    private Long id;

    /** 待办集id */
    private Long sid;

    /** 待办名称 */
    private String name;

    /** 分钟数 */
    private int timeDuration;

    /** 类型 默认 common */
    private String type;

    /** 时间类型-默认倒计时 */
    private String timeWay;

    /** 背景 */
    private String background;

    /** 背景颜色 */
    private String color;


    /** 创建时间 */
    private Date createtime;

    /** 休息时间 */


    /** 循环次数 */


    /** 成功还是失败 */
    private String status;

    /** 打断的原因 */
    private String reason;

    public ToDo parse() {
        ToDo toDo = BeanUtil.copyProperties(this, ToDo.class);
        toDo.setLoopTimes(0L);
        toDo.setRestTime(5L);
        toDo.setHideAfterComplete(0L);
        toDo.setCreatetime(new Date());
        return toDo;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getSid() {
        return sid;
    }

    public void setSid(Long sid) {
        this.sid = sid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getTimeDuration() {
        return timeDuration;
    }

    public void setTimeDuration(int timeDuration) {
        this.timeDuration = timeDuration;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTimeWay() {
        return timeWay;
    }

    public void setTimeWay(String timeWay) {
        this.timeWay = timeWay;
    }

    public String getBackground() {
        return background;
    }

    public void setBackground(String background) {
        this.background = background;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }


    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

}
